/**
 * S02
 * 类型断言
 */

export class People {
  public myusername!: string
  public myage!: number
  public address!: string
  public phone!: string
  eat() {}
}

export class Stu extends People {
  public username!: string
  public age!: number
  public address!: string //
  constructor(username: string, age: number, address: string, public phone: string) {
    super()
    this.address = address
  }
  study() {}
}

export class Teacher {
  public myusername!: string
  public address!: string
  public phone!: string
}

export class Cat {
  public myusername!: string
  public color!: string
}

// 联合类型
function selfMutiply(one: string | number) {
  const newOne = one as string
}